
function InlineImgObj(pdObjs) {
	this.nID = null;
	this.path = null;
	this.srvPath = null;
	this.position = null;
	this.width = null;
	this.height = null;
	this.matrix = null;
	
	this.nGraphStateID = -1;
	this.nClrStateID = -1;
	this.nGenStateID = -1;
	this.nTextStateID = -1;
	this.nClipPathStateID = -1;
	this.domImg = null;
	

	this.m_fileName = "";
	this.m_fOrgx = null;
	this.m_fOrgy = null;
	this.m_pdObjs = pdObjs;

	//	this.bUsedSoftMask = false;
	this.GetBBox = function (mtObj2Dev) {
	    this.CalcBBox();
	    var rect = mtObj2Dev.TransFormRect(this.position[0], this.position[1], this.position[2], this.position[3]);
	    return rect;
	}
}

// set up prototype inheritance chain
setupInheritPrototype(InlineImgObj, PageObj);

InlineImgObj.prototype.ParseJson = function(arrayData) {
	//var this = this;
	this.nID = arrayData[1];
	this.path = arrayData[11];
	this.srvPath = arrayData[12];
	this.position = stringArr2NumArr(arrayData[2]);
	this.width = arrayData[9];
	this.height = arrayData[10];
	this.SetMatrix(stringArr2NumArr(arrayData[3]));
	this.nGraphStateID = arrayData[6];
	this.nClrStateID = arrayData[7];
	this.nTextStateID = arrayData[8];
	this.nGenStateID = arrayData[4];
	this.nClipStateID = arrayData[5];
	
};

InlineImgObj.prototype.ParseFromBin = function (rd) {

    this.nID = rd.readUint32();
    var nMatrixID = rd.readInt16();
    this.matrix = this.m_pdObjs.GetMatrixByID(nMatrixID);
	this.m_fOrgx = rd.readFloat32();
    this.m_fOrgy = rd.readFloat32();
    this.width = rd.readInt32();
    this.height = rd.readInt32(); ;

    var nFormatmp = rd.readByte();
    var name = rd.readInt32();
    if (nFormatmp == 0) {
        this.m_fileName = name.toString() + ".png";
    } else if (nFormatmp == 1) {
        this.m_fileName = name.toString() + ".jpg";
    }
}



